//
//  SpacingTableCell.m
//  s.
//
//  Created by fanshijian on 2022/8/25.
//  Copyright © 2022 J. All rights reserved.
//

#import "SpacingTableCell.h"
#import "SpaceModel.h"

@implementation SpacingTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = UIColor.whiteColor;
    }
    return self;
}

- (void)setModel:(SpaceModel *)model {
    if (self.model != model) {
        [super setModel:model];
        if (model.color) {
            self.backgroundColor = jy_HexColor(model.color);
        }else {
            self.backgroundColor = [UIColor clearColor];
        }
    }
}
@end
